import { request } from '@umijs/max';

// 请求员工列表
export async function queryStafflist(body: any, options?: { [key: string]: any }) {
  return request('/staff/stafflist', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
// 员工新增
export async function addStaff(body: any, options?: { [key: string]: any }) {
  return request('/staff/staffadd', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
// 员工更新
export async function updateStaff(body: any, options?: { [key: string]: any }) {
  return request('/staff/staffupdate', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
// 员工删除
export async function delStaff(body: any, options?: { [key: string]: any }) {
  return request('/staff/staffdelete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
